<%--
  Created by IntelliJ IDEA.
  User: 陈世顺
  Date: 2022/3/23
  Time: 11:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>answer</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
%>
<form action="result.jsp" method="post">
    <% String name = request.getParameter("name");
        String kaohao = request.getParameter("kaohao");
        String abcd = request.getParameter("abcd");
        String duicuo = request.getParameter("duicui");
        int sco = 0;
        if ("A".equals(abcd))
            sco += 2;
        if ("Flase".equals(duicuo))
            sco += 2;
        String n1 = String.valueOf(sco);
        session.setAttribute("name", name);
        session.setAttribute("kaohao", kaohao);
        session.setAttribute("sco", n1);
    %>
    您的姓名为:<%=name%><br>
    您的考号为:<%=kaohao%><br>
    一、单项选择题（每题2分）<br>
    1.<%=abcd%><br>
    二、判断题（每题2分）<br>
    2.<%=false%><br>
    <a href="result.jsp">提交</a><br>
    <a href="exam.jsp">重新答题</a>
</form>
</body>
</html>
